﻿<%@ page language="java" pageEncoding="utf-8"%>
<%@ page import="net.ssta.core.db.Record"%>
<%@ page import="net.ssta.core.db.RecordSet"%>
<%@ page import="java.util.*"%>
<%
String path = request.getContextPath();
Record techneedinfo = (Record)request.getAttribute("techneedInfo");
RecordSet newEnerClass = (RecordSet)request.getAttribute("newenergyclass");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML>
<HEAD>
    <TITLE>信息管理-安全生产科技成果推广网</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=utf-8">
    <META http-equiv=x-ua-compatible content=ie=7>
    <META content="MSHTML 6.00.6000.17107" name=GENERATOR>
    <link href="<%=path%>/common1/css/layout.css" rel="stylesheet" type="text/css" />
	<link href="<%=path%>/common1/css/user.css" rel="stylesheet" type="text/css" />
    <LINK href="<%=path%>/includes/Fvalidate/style.css" type=text/css rel=stylesheet>
    <script type="text/javascript" src="<%=path%>/includes/DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="<%=path%>/includes/styleBase/js/jquery.js"></script>
	<script type="text/javascript" src="<%=path%>/includes/KindEditor/kindeditor.js"></script>    
    <script type="text/javascript" src="<%=path%>/includes/Fvalidate/Fvalidate.js"></script>

    <SCRIPT>
	$(document).ready(function(){
	$("#frm").Fvalidate({live:true});
    //富文本编辑器
    KE.show({
		id : 'editorContent',
		resizeMode : 1,
		allowUpload : true,
		imageUploadJson : '<%=path%>/servlet/FileUploadManagerServlet?method=saveImageOfArticle',
		afterCreate : function(id) {},
		filterMode : true,
		
		items : ["source","|","fullscreen","undo","redo","print","cut","copy","paste","plainpaste",
"wordpaste","|","justifyleft","justifycenter","justifyright","justifyfull","insertorderedlist","insertunorderedlist","indent","outdent","subscript","superscript","|","selectall","-","title","fontname","fontsize","|","textcolor","bgcolor","bold","italic","underline","strikethrough","removeformat","|","image","flash","media","advtable","hr","emoticons","link","unlink","|","about"]
		});
	
	});
	
	function saveEditContent(){
		if(checkinput()){
			content = KE.util.getPureData("editorContent")
			htmlcontent = KE.html("editorContent");
			
			document.getElementById("TECHNEED_INTRO").value=content;
			document.getElementById("TECHNEED_INTROHTML").value=htmlcontent;
			
			document.frm.action="<%=path%>/membercenter/market?method=updateTechneed";
			document.frm.submit();
		}
	}
	
	function _cancel(){
		window.location.href="<%=path%>/membercenter/market?method=techneedList";
	}
	
	function checkinput(){
		if(!$("#frm").Fvalidate()){return false;}
		/*
		var ck = document.getElementsByName("TECHNEED_COOPERATEWAY");
		var checkedcount = 0;
		for(i=0;i<ck.length;i++){
			if(ck[i].checked){
				checkedcount++;
				break;
			}
		}
		if(checkedcount<1){
			alert("[合作方式]不能为空");
			return false;
		}
		*/
		if(KE.util.getPureData("editorContent")==null || KE.util.getPureData("editorContent").length<20){
			alert("[简要说明]请输入20个汉字以上");
			return false;
		}
		return true;
	}
	function chooseOne(obj){
		var ck = document.getElementsByName(obj.name);
		for(i=0;i<ck.length;i++){
			if(ck[i].value != obj.value){
				ck[i].checked = false;
			}
		}
	}
    </SCRIPT>    
    <style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
    </style>
</HEAD>

<BODY>
<%@include file="../../common1/toplogin.jsp"%>    
<%@include file="../../common1/topbanner.jsp"%> 
<%@include file="../../common1/topmenu.jsp"%> 

<form  id="frm" name="frm"  method="post">
<div id="contentmain">

	<div id="content_left">
	  	<%@include file="../include/userbaseInfo.jsp"%>
		
		 <jsp:include   page="../include/marketleft.jsp"    flush="true">   
		      <jsp:param    name="selected"    value="2"    />   
		 </jsp:include>
	 </div>
    
        <div id="content_right">
      <jsp:include   page="../include/baseTop.jsp"    flush="true">   
		      <jsp:param    name="open"    value="2"    />   
		</jsp:include>
      <Br />
      
      <input type="hidden" name="uuid" id="uuid" value="<%=techneedinfo.getString("ID","")%>">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
        	<td width="180" height="30" class="leftTipArea" align="right" >技术需求名称<span class="STYLE1">*</span>：</td>
          <td width="600" align="left"><input type="text" maxlength="70" id="TECHNEED_TITLE" name="TECHNEED_TITLE"  size="60" class="input_text_grey" label="技术需求名称" value="<%=techneedinfo.getString("TITLE")%>"></td>
        </tr>
        <tr>
        	<td width="180" height="30" class="leftTipArea" align="right">所属行业领域：</td>
            <td width="600" align="left">
			<%
			String classcode=techneedinfo.getString("NEWENERGYCLASS","");
			%>
            <select name="TECHNEED_NEWENERGYCLASS" id="TECHNEED_NEWENERGYCLASS" label="所属行业领域">
				<option value="">请选择</option>
                <%
	  		for(int i=0;i<newEnerClass.size();i++){
	  			Record ecRecord = newEnerClass.get(i);
	  		%>
      			<option <%=classcode.equals(ecRecord.getString("OPTIONVALUE","").trim())?"selected":"aaa"%> value="<%=ecRecord.getString("OPTIONVALUE","").trim()%>"><%=ecRecord.getString("OPTIONNAME","")%></option>
		   <%
           }
           %>
            </select>
          </td>
        </tr>
        <tr>
        	<td width="180" height="30" class="leftTipArea" align="right">关键词：</td>
            <td width="600" align="left"><input type="text" id="TECHNEED_TOPICWORDS" name="TECHNEED_TOPICWORDS" size="40" value="<%=techneedinfo.getString("TOPICWORDS")%>" class="input_text_grey" maxlength="100" label="关键词"> </td>
        </tr>
        <tr>
        	<td width="180" height="30" class="leftTipArea" align="right">合作方式：</td>
            <td width="600" align="left"><%String cooperateway=techneedinfo.getString("COOPERATEWAY","");%>
 	           	<input type="checkbox" name="TECHNEED_COOPERATEWAY" style="border:0;" value="1" onClick="chooseOne(this)" <%if("1".equals(cooperateway)){%>checked<%}%>>技术引进
                <input type="checkbox" name="TECHNEED_COOPERATEWAY" style="border:0;" value="2" onClick="chooseOne(this)" <%if("2".equals(cooperateway)){%>checked<%}%>>委托开发
                <input type="checkbox" name="TECHNEED_COOPERATEWAY" style="border:0;" value="3" onClick="chooseOne(this)" <%if("3".equals(cooperateway)){%>checked<%}%>>合作开发
                <input type="checkbox" name="TECHNEED_COOPERATEWAY" style="border:0;" value="4" onClick="chooseOne(this)" <%if("4".equals(cooperateway)){%>checked<%}%>>面议
          </td>
        </tr>
        <tr>
        	<td width="180" height="30" class="leftTipArea" align="right">联系单位：</td>
            <td width="600" align="left"><input type="text" maxlength="70" id="TECHNEED_LINKUNIT" name="TECHNEED_LINKUNIT"  size="60" value="<%=techneedinfo.getString("LINKUNIT")%>" class="input_text_grey" label="联系单位"></td>
        </tr>
        <tr>
        	<td width="180" height="30" class="leftTipArea" align="right">联系人<span class="STYLE1">*</span>：</td>
          <td width="600" align="left"><input type="text" maxlength="15" id="TECHNEED_LINKMAN" name="TECHNEED_LINKMAN"  size="30" value="<%=techneedinfo.getString("LINKMAN")%>"  class="input_text_grey" required="" label="联系人"></td>
        </tr>
        <tr>
        	<td width="180" height="30" class="leftTipArea" align="right">联系人电话：</td>
            <td width="600" align="left"><input type="text" maxlength="20" id="TECHNEED_TEL" name="TECHNEED_TEL"  size="30" value="<%=techneedinfo.getString("TEL")%>"  class="input_text_grey" label="联系人电话"></td>
        </tr>
        <tr>
        	<td width="180" height="30" class="leftTipArea" align="right">联系人手机<span class="STYLE1">*</span>：</td>
          <td width="600" align="left"><input type="text" maxlength="15" id="TECHNEED_CELLPHONE" name="TECHNEED_CELLPHONE"  size="30" value="<%=techneedinfo.getString("CELLPHONE")%>"  class="input_text_grey" required="" label="联系人手机" rule="number"></td>
        </tr>
        <tr>
        	<td width="180" height="30" class="leftTipArea" align="right">联系人Email：</td>
            <td width="600" align="left"><input type="text" maxlength="30" id="TECHNEED_EMAIL" name="TECHNEED_EMAIL"  size="30" value="<%=techneedinfo.getString("EMAIL")%>"  class="input_text_grey" label="联系人Email" rule="email" error="Email的格式不正确"></td>
        </tr>
        <tr>
        	<td width="180" height="30" class="leftTipArea" align="right">通讯地址：</td>
            <td width="600" align="left"><input type="text" maxlength="70" id="TECHNEED_ADDR" name="TECHNEED_ADDR"  size="60" value="<%=techneedinfo.getString("ADDR")%>" class="input_text_grey" label="通讯地址"></td>
      </tr>
        <tr>
        	<td width="180" height="30" class="leftTipArea" align="right">邮编：</td>
            <td width="600" align="left"><input type="text"  id="TECHNEED_ZIP" name="TECHNEED_ZIP" maxlength="6" size="10" value="<%=techneedinfo.getString("ZIP")%>" class="input_text_grey" label="邮编" rule="number"></td>
        </tr>
        <tr>
        	<td width="180" height="30" class="leftTipArea" align="right">信息有效期：</td>
            <td width="600" align="left"><input type="text"  id="TECHNEED_VALID" name="TECHNEED_VALID" size="10" class="input_text_grey" readonly label="信息有效期" onClick="WdatePicker()" value="<%=techneedinfo.getString("VALID")%>"></td>
        </tr>
        <tr>
        	<td width="180" height="30" class="leftTipArea" valign="top" align="right">简要说明<span class="STYLE1">*</span>：</td>
          <td width="600" align="left">
            <input type="hidden"  id="TECHNEED_INTRO" name="TECHNEED_INTRO" value="" class="input_text_grey">
            <input type="hidden"  id="TECHNEED_INTROHTML" name="TECHNEED_INTROHTML" value="" class="input_text_grey">
            <textarea class=""  id ="editorContent" name="editorContent" style="width:98%;height:195px;visibility:hidden;word-wrap:break-word;word-break:break-all;"><%=techneedinfo.getString("INTROHTML")%></textarea>
          </td>
        </tr>
        <tr>
          <td height="50">&nbsp;</td>
          <td align="left"><img src="<%=path%>/common1/images/user/botton_6.gif" title="提交发布" onClick="javascript:saveEditContent();" style="cursor:hand;"/>
            <img src="<%=path%>/common1/images/user/botton_7.gif" border="0" title="取消发布" onClick="javascript:_cancel();" style="cursor:hand;" /> </td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table>
    </div>
</div>
</form>

<%@include file="../../common1/bottom.jsp"%>    

</BODY>
</HTML>
